php forum
php mysql forum
php mysql smarty
 
Topic Options
#142041 - 03/25/01 09:29 PM [6.0x] Cleaning up make_random_number sub [ Finished ]
Greg Hard Offline
Member

Registered: 02/21/00
Posts: 5533
Loc: My Room
By CAL:
find:
Code:
[/code]
replace with:
[code]


At the top of ubb_lib.cgi find:
Code:
[/code]
Under it add:
[code]


[ March 26, 2001: Message edited by: MasterMind ]

Top
#142042 - 03/26/01 01:07 AM Re: [6.0x] Cleaning up make_random_number sub [ Finished ]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Hey MM, that looks pretty good. Does it affect speed? Or is it just a much cleaner way of writing that sub?
_________________________
- Allen wavey
- What Drives You?

Top
#142043 - 03/26/01 08:23 AM Re: [6.0x] Cleaning up make_random_number sub [ Finished ]
no1knows Offline
Junior Member

Registered: 01/15/01
Posts: 16
probably a stupid question, but where can i find that sub?

Top
#142044 - 03/26/01 09:26 AM Re: [6.0x] Cleaning up make_random_number sub [ Finished ]
Zorro Offline
Member

Registered: 03/03/01
Posts: 91
Quote:
quote:


You can find it in ubb_lib.cgi.

Top
#142045 - 03/26/01 09:37 AM Re: [6.0x] Cleaning up make_random_number sub [ Finished ]
Greg Hard Offline
Member

Registered: 02/21/00
Posts: 5533
Loc: My Room
Hi Borg!

[ March 26, 2001: Message edited by: MasterMind ]

Top
#142046 - 03/26/01 10:41 AM Re: [6.0x] Cleaning up make_random_number sub [ Finished ]
Ell Offline
Member

Registered: 07/22/00
Posts: 1429
Loc: Surrey, UK | Resistance: Futil...
Hi Greg!

Top
#142047 - 03/26/01 11:03 AM Re: [6.0x] Cleaning up make_random_number sub [ Finished ]
cal Offline
Programmer

Registered: 02/19/99
Posts: 3433
Loc: London, UK | Genius: 100%
NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO!

DO NOT USE THIS AS IS!!!!!!

You need two important changes. Firstly, my example code generates a 5 digit random, whilst the existing gives a 6 digit. This version works:
Code:
code:
Secondly, you MUST put a call to "srand(time());" somewhere where it will get run once per execution (like the top os lib.cgi) else they wont be random at all!

Just a thought smile
_________________________
http://www.iamcal.com

Top
#142048 - 03/26/01 11:14 AM Re: [6.0x] Cleaning up make_random_number sub [ Finished ]
Ell Offline
Member

Registered: 07/22/00
Posts: 1429
Loc: Surrey, UK | Resistance: Futil...
Greg: Shouldn't this be included in your "speeding up UBB" hack? smile

BTW, 2 huge bugs in 1 line of code? Must be a record. wink

Top
#142049 - 03/26/01 12:56 PM Re: [6.0x] Cleaning up make_random_number sub [ Finished ]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
smile

Somebody wanna finish this then?
_________________________
- Allen wavey
- What Drives You?

Top
#142050 - 03/26/01 01:41 PM Re: [6.0x] Cleaning up make_random_number sub [ Finished ]
drkknght Offline
Kahuna

Registered: 11/09/00
Posts: 1251
Loc: rob's pad -- where it takes sk...
and also...

please tell me (poor, poor rob) what this does?

i mean, sure, we all want clean make_random_number subs. my mom never let me leave home without one on! but... ...now that im all grow'd up... what does it do?
_________________________
professional discussion killer
due to intelligence limitations, i do not offer support.
my site ~ my boards

Top
#142051 - 03/26/01 04:18 PM Re: [6.0x] Cleaning up make_random_number sub [ Finished ]
Greg Hard Offline
Member

Registered: 02/21/00
Posts: 5533
Loc: My Room
Fixed docs.
It cleans up the make random number sub. wink

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks